package cn.mw.cmdb.enums;

/**
 * @author qzg
 * @date 2022/8/30
 */
public enum VirtualizationTypeEnum {
    VCENTER("VCenter","VCenter"),
    DATACNETER("Datacenter","数据中心"),
    CLUSTER("ClusterComputeResource","集群"),
    DATASTORE("Datastore","数据存储"),
    HOSTSYSTEM("HostSystem","宿主机"),
    VIRTUALMACHINE("VirtualMachine","虚拟机");

    private String type;
    private String desc;


    VirtualizationTypeEnum(String type, String desc){
        this.desc = desc;
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }


    public static VirtualizationTypeEnum getVirtualizationType(String type){
        for(VirtualizationTypeEnum checkModelEnum : VirtualizationTypeEnum.values()){
            if(checkModelEnum.getType().equals(type)){
                return checkModelEnum;
            }
        }
        return null;
    }

}
